Lender Price API
In This Topic
    [Remove??] Third Party Use of Pricing in iFrame
    In This Topic

    Prerequisites

    Environment Settings

    Production

    UAT

    Stage

    Reflector API: Introspect Object

    Search Object (1)

    Use one of the two requests below:

    Request
    Copy Code
    curl --location --request GET 'https://[PPE_RAPI]/rest/v1/reflector/class/com.cre8techlabs.entity.rate.Search'

     

    Request
    Copy Code
    curl --location --request GET 'https://[PPE_RAPI]/rest/v1/pricing/getNewSearchModel' \
    --header 'secret: [SECRET]' \
    --header 'companyid: [COMPANYID]' \
    --header 'Content-Type: application/json'

    Authentication

    API Auth

    Using an auth token, every request has the following header: Authorization: Bearer TOKEN

    Using a secret (Legacy), 'https://[PPE_RAPI]/' + 'encodeAES128/' + key + '/' + userId will give you the secret.

    The headers are:
    Get Auth Token for iFrame
    Copy Code
    curl --location --request POST 'https://[AUTH_SERVICE]/oauth/token' \
    --header 'Authorization: Basic TE9TOkxPU19QQVNTV09SRA==' \
    --form 'username="[USERNAME]"' \
    --form 'password="[PASSWORD]"' \
    --form 'grant_type="password"' \
    --form 'client_id="LOS"'
    --form 'ext_loan_id="5ff0ed98e189c40001c54120"' \
    --form 'ext_user_id="lendingpad_user_name"'

     

    Get Auth Token for API
    Copy Code
    curl --location --request POST 'https://ppe-stg-auth.cre8techdev.com/oauth/token' \
    --header 'Origin: {{Origin}}' \
    --header 'Authorization: Basic cHBlLWxlbmRlcnByaWNlOmxwc2VjcmV0' \
    --form 'username="[USERNAME]"' \
    --form 'password="[PASSWORD]"' \
    --form 'grant_type="password"' \
    --form 'client_id="ppe-lenderprice"' \
    --form 'trusted="true"'

    Create a Loan

    Create a Loan
    Copy Code
    curl --location --request POST 'https://[PPE_RAPI]/rest/v1/pipeline' \
    --header 'secret: SECRET' \
    E!
    
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "test",
        "note": "",
        "person": {
            "firstname": null,
            "lastname": null,
            "middlename": null,
            "sex": null,
            "birthDate": null,
            "title": null,
            "address": {
                "street": "",
                "streetCont": "",
                "city": "",
                "zip": "",
                "state": ""
            },
            "contactDetails": {
                "email": null,
                "phone": null,
                "fax": null,
                "mobile": null
            }
        },
        "associatedUserId": null,
        "search": SEARCH_REFER_TO_(1)
    }'

    Connect to the iFrame

    Create a loan, or update the loan

    The LOAN_ID parameter is used to connect to the iFrame.

     

    Connectivity to the iFrame

    Authentication Service

     

    Ext Client

    1. Create a page which will receive the JWT token as parameter.
    2. Register the JWT in the front end application (local storage).
    3. Send the information to the Lender Price back end. Lender Price will fetch the ext loan using an already existing method and redirect the user to the pricing page with the ext loan parameter.

    EVENT

    A Callback url can be registered per company.

    The callback will be triggered from every event in Lender Price.

    As of today only the Pricing event will be triggered as such:

    Copy Code
    {
      eventType: 'Pricing',
      loanId: ‘loanID’,
      search: SEARCH_OBJECT,
      result: PRICING_RESULT
    }